package br.com.absolutech.study.chapter7.pag339;

import java.util.List;

class Animal {
}
class Dog extends Animal {
}
class Cat extends Animal {
}

public class GenTest1 {

	public void addAnimal(List<? extends Animal> animals) {
		animals.add(new Dog()); //nao se pode adicionar se usarmos <? extends Animal>
	}
}
